About

Basic functions

  • _init()

    • In the beginning of the game.

    • Variables are defined here.

  • _update()

    • 30 times a second.

  • _draw()

    • 30 times a second, after _update() .

  • cls()

    • Clear screen.

  • pset(x, y, color_idx)

    • Draw a pixel.

  • spr(sprite_idx, x, y)

    • Draw a sprite.

  • map(x, y)

    • Draw a map.

  • btn(button)

    • Button down.

  • btnp(button)

    • Button press.

  • sfx(sound_idx)

    • Play sound.